class Companies::Schedule < ApplicationRecord
  self.table_name = 'companies_schedules'
  enum status: {'pending': 0, 'publishing': 1, released: 2}

  #批次号，用于查询课表
  def batch_no
    date.strftime('%Y%m%d') + ('%06d') % (id % 1000000)
  end
end
